<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>下级管理</title>
	<link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
	<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
	<link rel="stylesheet" href="/wjfh/css/iconfont.css">
	<link rel="stylesheet" type="text/css" href="/wjfh/css/common.css"/>
	<link rel="stylesheet" type="text/css" href="/wjfh/layui/css/layui.css"/>
	<link rel="stylesheet" type="text/css" href="/wjfh/css/style.css"/>
	<script src="/wjfh/js/flexible.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<div class="resgcontain">
		<h1 class="site-h1">下级管理</h1>
		<div class="saomaiptbox">
			<input type="text" class="publicIptSty widthman" id="" placeholder="代理商昵称" v-model="xiajiname"/>
			<span class="icon iconfont">&#xe602;</span>
		</div>
	</div>
<div id="myPer" v-cloak>
	<div class="resgcontain  layui-form" v-for="(dldds,index) in dldd">
		<div class="item">
			<div class="dingdantop layui-row xiajitop">
				<div class="layui-col-xs5">
					<img class="dengjino" v-if="index == 0" src="/wjfh/img/no1.png" alt="">
					<img class="dengjino" v-if="index == 1" src="/wjfh/img/no2.png" alt="">
					<img class="dengjino" v-if="index == 2" src="/wjfh/img/no3.png" alt="">
					{{dldds.userName}}
					<span class="layui-badge layui-bg-orange" style="margin-left: 0.2rem;">{{dldds.deptName}}</span>
				</div>
				<div class="layui-col-xs7">入驻时间:{{dldds.createTime}}</div>
			</div>
		</div>
		<div class="item dingdancot mb">
			<div class="dingdantop layui-row item xiajilist">
				<div class="layui-col-xs3">产品名称</div>
				<div class="layui-col-xs3">总订单</div>
				<div class="layui-col-xs3">库存</div>
				<div class="layui-col-xs3">销量</div>
			</div>
			<div class="dingdantop layui-row item xiajilist" v-for="(orderInfos,key,index) in dldds.orderInfo">
				<div class="layui-col-xs3">{{key}}</div>
				<div class="layui-col-xs3">{{orderInfos.total}}</div>
				<div class="layui-col-xs3">{{orderInfos.stock}}</div>
				<div class="layui-col-xs3">{{orderInfos.sail}}</div>
			</div>
			<div class="dingdantop layui-row item xiajilist ">
				<div class="layui-col-xs6 textleft">
					销量金额:<span class="num">￥{{dldds.amount}}</span>
				</div>
				<div class="layui-col-xs6 textleft">
					已获得奖励：<span class="num">￥{{dldds.profit}}</span>
				</div>
			</div>
		</div>
	</div>
</div>
	<div class="pubfooter">
		<div class="layui-row">
			<div class="layui-col-xs3 tcenter footnav">
				<a href="/goodsManager/page/index">
					<span class="layui-icon footicon">&#xe68e;</span>
					<div class="name">首页</div>
				</a>
			</div>
			<div class="layui-col-xs3 tcenter footnav">
				<a href="/goodsManager/page/ddgl">
					<span class="layui-icon footicon">&#xe656;</span>
					<div class="name">订单</div>
				</a>
			</div>
			<div class="layui-col-xs3 tcenter footnav">
				<a href="/goodsManager/page/myPer">
					<span class="icon iconfont footicon">&#xe623;</span>
					<div class="name">业绩</div>
				</a>
			</div>
			<div class="layui-col-xs3 tcenter footnav active">
				<a href="/goodsManager/page/xiaji">
					<span class="layui-icon footicon">&#xe66f;</span>
					<div class="name">下级</div>
				</a>
			</div>
		</div>
	</div>

	<script src="/wjfh/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	<script src="/wjfh/js/vue.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="/wjfh/js/axios.js" type="text/javascript" charset="utf-8"></script>
	<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
	<script>
        var idata = new  Vue({
            el:"#myPer",
            data:{
                dldd:{},
				xiajiname:''
            },
            methods:{

            },
            mounted:function () {

                layui.use(['jquery', 'form','layer'], function() {
                    $ = layui.jquery,
                        form = layui.form,
                        layer = layui.layer;
                    layer.ready(function(){
                        layer.load(1);
                    });
                    $.ajax({
                        cache: true,
                        type: "POST",
                        url: "/goodsManager/retail/subordinate",
                        error : function(request) {
                            layer.alert("Connection error");
                        },
                        success : function(data) {
                            console.log(data);
                            idata.dldd = data;
                            layer.closeAll('loading');
                        }
                    });

                })
            }
        })
	</script>
</body>
</html>
